package com.tange.feature.data.structure;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;
import com.tange.base.toolkit.NotProguard;

@NotProguard
public class DeviceTypeBean implements Parcelable {
    public static final String DEVICE_TYPE_BEAN = "device_type_bean";
    private String device_type;

    @SerializedName("should_reset")
    private boolean shouldReset;

    public void setShouldReset(boolean shouldReset) {
        this.shouldReset = shouldReset;
    }

    public boolean isShouldReset() {
        return shouldReset;
    }

    protected DeviceTypeBean(Parcel in) {
        device_type = in.readString();
        shouldReset = in.readByte() != 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(device_type);
        dest.writeByte((byte) (shouldReset ? 1 : 0));
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DeviceTypeBean> CREATOR = new Creator<DeviceTypeBean>() {
        @Override
        public DeviceTypeBean createFromParcel(Parcel in) {
            return new DeviceTypeBean(in);
        }

        @Override
        public DeviceTypeBean[] newArray(int size) {
            return new DeviceTypeBean[size];
        }
    };

    public String getDevice_type() {
        return device_type;
    }
}

